{extend name='table'}
{block name="content"}
<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="currency">
    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('币制名称')}</label>
            <div class="layui-input-block">
                <input name="currency_name" value='{$vo.currency_name|default=""}' class="layui-input" placeholder="{:lang('币制名称必填')}" required>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('英文名称')}</label>
            <div class="layui-input-block">
                <input name="currency_name_en" value='{$vo.currency_name_en|default=""}' class="layui-input" placeholder="{:lang('英文名称必填')}" required>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('国际货币代码')}</label>
            <div class="layui-input-block">
                <input name="abbreviation" value='{$vo.abbreviation|default=""}' class="layui-input" placeholder="{:lang('国际货币代码必填')}" required>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('符号')}</label>
            <div class="layui-input-block">
                <input name="symbol" value='{$vo.symbol|default=""}' class="layui-input" placeholder="{:lang('符号必填')}" required>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('汇率')}</label>
            <div class="layui-input-block">
                <input name="exchange_rate" type="number" value='{$vo.exchange_rate|default=""}' class="layui-input" placeholder="{:lang('汇率必填')}" required>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('系统默认')}</label>
            <div class="layui-input-block">
                {if !empty($vo.is_default) && $vo.is_default == '1'}
                <input type="checkbox" name="is_default" title="{:lang('设置为默认币种，系统将会显示此币种')}" value="1" checked>
                {else/}
                <input type="checkbox" name="is_default" title="{:lang('设置为默认币种，系统将会显示此币种')}" value="1">
                {/if}
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('描述')}</label>
            <div class="layui-input-block">
                <textarea name="desc" placeholder="{:lang('请输入描述')}" class="layui-textarea">{$vo.desc|default=""}</textarea>
            </div>
        </div>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
        {if !empty($vo.id)}<button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗')}" data-close>{:lang('取消编辑')}</button>{/if}
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
        </div>
    </div>
</form>
<script>

</script>
{/block}